#ifndef XGS_PLAY_H
#define XGS_PLAY_H
#include "GameCore\GameState.h"
#include "GameCore\DXDeviceWP8.h"
#include "GameCore\Sprite.h"
#include "GameObjects\PlayerShip.h"
#include "GameObjects\Bullet.h"
#include "GameObjects\Map.h"
#include <vector>
#include "GameCore\XColladaDX.h"
#include "GameCore\Material.h"
#include "GameCore\Sampler.h"
class GS_Play: public GameState, public Singleton<GS_Play>
{
	PlayerShip* ship;
	std::vector<Bullet*> playerBulletList;
	std::vector<Bullet*> enemyBulletList;
	std::vector<Bullet*> destroyedBulletList;
	std::vector<Ship*> enemyShipList;
	RenderTarget* distortionFX;
	std::string mapText;
	Map map;
	XColladaDX* jet;
	char* jetBuffer;
	unsigned int jetSize;
	Material* material_Tex1_Diffuse;
	Sampler* sampler;
	virtual void Init();
	virtual bool PostInit(int& step);
	virtual void Release();
	virtual void Update(float timeTotal, float timeDelta);
	virtual void Render();
public:
	GS_Play()
	{
		SafeDelete(instance);
		instance = this;
		sampler = new Sampler(D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT, D3D11_TEXTURE_ADDRESS_CLAMP);
	}
	~GS_Play()
	{
		instance = NULL;
		SafeDeleteArray(jetBuffer);
		SafeDelete(sampler);
	}
	static void AddPlayerBullet(Bullet* b);
	static void AddEnemyBullet(Bullet* b);
};
#endif